package router

import "github.com/gin-gonic/gin"

func WebRouter(r *gin.Engine) {
	// favicon.ico
	r.StaticFile("/favicon.ico", "./static/favicon.ico")
	// 404
	r.NoRoute(func(c *gin.Context) {
		c.JSON(404, gin.H{
			"code":    1,
			"message": "无效的路径：" + c.Request.URL.Path,
		})
	})
}
